<?php

class PostControllerHook
{

    function doInit()
    {
		
		$this->CI =& get_instance();
		if (!isset($this->CI->render_template))
			return;
			
		if($this->CI->template->template['template'] == 'template_default' || $this->CI->template->template['template'] == 'template_home')
		{
			$this->CI->load->model('product_model');
			
			$this->CI->template->write_view('sidebar_left', 'sidebar_deals_block.php', NULL, FALSE);
			
			$this->CI->template->write_view
			(
				  'sidebar_left'
				, 'category_list_block'
				, array('categories' => $this->CI->product_model->get_category_list())
				, FALSE
			);
			
			$this->CI->template->write_view('sidebar_left', 'social_block', NULL, FALSE);
		}
		
		if($this->CI->template->template['template'] != 'template_admin' && $this->CI->template->template['template'] != 'template_admin_simple')
		{
			$this->CI->template->write_view('footer', 'footer_default_block', NULL, FALSE);
		}
		
		$this->CI->template->render();	
    }
}

/* End of file post_controller_hook.php */
/* Location: ./application/hooks/post_controller_hook.php */